<extend name='Public/_Main' />
<block name='right'>
    <form class="am-form">
    <div class='table-responsive'>
        <table class="table table-hover">
            <thead>
                <tr>
                    <th align="center" style="text-align:center">ID</th>
                    <th class="table-id">排序</th>
                    <th class="table-title">名称</th>
                    <th class="table-date am-hide-sm-only">是否启用(1为启用,0为禁用)</th>
                    <th class="table-set">操作</th>
                </tr>
            </thead>
            <tbody>
                <foreach name='Classification' item='list'>
                    <tr>
                        <td align="center" class="id">{$list.id}</td>
                        <td>
                            <input type="text" class='node_sort form-control' value='{$list.sort}' name='sort' />
                        </td>
                        <td>
                            <a href="#">
                                <input type='text' value='{$list.name}' class='form-control' name='name'>
                            </a>
                        </td>
                        <td class="am-hide-sm-only">
                            <input type='text' value='{$list.auth}' name='auth' class='form-control'>
                        </td>
                        <td>
                            <div role="group" class="btn-group">
                                <a href="{:U('delete_Classification',array('id'=>$list['id']))}" class="btn btn-danger getajax">删除</a></div>
                        </td>
                    </tr>
                </foreach>
            </tbody>
        </table>
        </div>
    </form>
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">新增权限组</h4>
                </div>
                <div class="modal-body">
                    <form class="require" action="{:U('addClassification')}" method="post">
                        <div class="form-group">
                            <label for="exampleInputEmail1">分类名称<span class="Validform_checktip"></span></label>
                            <input type="text" class="form-control" placeholder="例：系统设置" datatype='s' nullmsg='配置名称不可为空' errormsg='格式错误' name="name">
                        </div>
                        <div class="modal-footer">
                            <div class='col-xs-6'>
                                <button class="btn btn-lg btn-primary btn-block" type="submit">保存</button>
                            </div>
                            <div class='col-xs-6'>
                                <button class="btn btn-lg btn-default btn-block" type="button" data-dismiss="modal">关闭</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--end Modal-->
</block>
<block name='javascript'>
    <script type="text/javascript">
    var romClassification = "{:U('romClassification')}";
    </script>
</block>
